<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models\Base;

use Carbon\Carbon;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class WorkTicketDetail
 *
 * @property int $id
 * @property int $work_ticket_id 工单id
 * @property int $related_id 关联id
 * @property string $related_type 关联类型,关联表的表名
 * @property string $content 内容
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property \Illuminate\Support\Carbon|null $deleted_at
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketDetail newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketDetail newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketDetail onlyTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketDetail query()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketDetail whereContent($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketDetail whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketDetail whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketDetail whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketDetail whereRelatedId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketDetail whereRelatedType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketDetail whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketDetail whereWorkTicketId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketDetail withTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketDetail withoutTrashed()
 * @mixin \Eloquent
 */
class WorkTicketDetail extends Model
{
	use SoftDeletes;
	use HasDateTimeFormatter;
	const ID = 'id';
	const WORK_TICKET_ID = 'work_ticket_id';
	const RELATED_ID = 'related_id';
	const RELATED_TYPE = 'related_type';
	const CONTENT = 'content';
	const CREATED_AT = 'created_at';
	const UPDATED_AT = 'updated_at';
	const DELETED_AT = 'deleted_at';
	protected $table = 'work_ticket_details';

	protected $casts = [
		self::ID => 'int',
		self::WORK_TICKET_ID => 'int',
		self::RELATED_ID => 'int',
		self::RELATED_TYPE => 'string',
		self::CREATED_AT => 'datetime',
		self::UPDATED_AT => 'datetime'
	];
}
